#ifndef MIXERWIDGET_H
#define MIXERWIDGET_H

#include <QStackedWidget>
#include <QtCore>
#include <QtSql>
#include <QMenu>
#include <QPushButton>

namespace Ui {
    class MixerWidget;
}

struct SentenceStrings
{
    QString themeEn;
    QString themeHu;
    QString sentenceHu;
    QString sentenceEn;
    QString sentenceGrouping;
};

class MixerWidget : public QStackedWidget
{
    Q_OBJECT

public:
    explicit MixerWidget(QWidget *parent = 0);
    ~MixerWidget();

private slots:
    void on_pushButtonClose_clicked();

    void on_commandLinkButtonStartMixer_clicked();

    void on_pushButtonCloseInGame_clicked();

    void on_pushButton_ChangeMode_clicked();
    void translateSlot();
    void translateSlot(QString);
    void mixButtonsClicked();
    void settingsReloadFromMainSlot();

    void on_pushButton_HelpOne_clicked();

    void on_toolButton_SpeechHU_clicked();

    void on_toolButton_SpeechEN_clicked();

    void on_pushButton_EditThemes_clicked();

    void on_pushButton_EditSentences_clicked();

    void on_pushButton_Next_clicked();

    void on_actionShow_Hungarian_sentence_toggled(bool );

    void on_actionUse_grouping_toggled(bool );

    void on_pushButton_EditThisSentence_clicked();

    void on_actionUseRightClickButtons_toggled(bool );

private:
    void getNewSentence(SentenceStrings &, int currentID=0);
    void splitSentenceToWordlist(SentenceStrings &, QStringList &);
    QString strippingButtonWord(QString);
    void startNewSentence(int currentID=0);
    void updateStatisticDisplays();
    void settingsLoad();
    void startpanelFill();
    void clearDisplayCounters();
    Ui::MixerWidget *ui;
    QList<QPushButton*> buttonsList;
    QMenu localOptionsMenu;
    QMenu translateMenu;
    QList<QAction *> localOptionsMenuList;
    QList<int> correctSequence;
    QQueue<QString> origWordList;
    int countCorrect;
    int countFalse;
    int countDone;
    int countUsedHelp;
    int numberofSumSentences;
    QSqlQueryModel model;
    QString defaultQueryString;
    QString currentQueryString;
    int currentSentenceID;
    QList<QAction*> translateActionsList;
    QList<QString> translateActionsListStrings;
    bool helpUsingNow;
    bool optionUseGrouping;
    bool optionUseRightClickButtons;
    QList<QStringList> settingsListMixer;
    QSqlQueryModel themeSqlModel;
    bool currentSentenceIsOnlyTrue;
    QList<int> sentenceIdList;
    int currentListIndex;
    bool isInGame;
};

#endif // MIXERWIDGET_H
